Optimal. Leaf size=22 \[ -\frac{a}{x}-\frac{b x^{n-1}}{1-n} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0295907, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ -\frac{a}{x}-\frac{b x^{n-1}}{1-n} \]
Antiderivative was successfully verified.
[In] Int[(a + b*x^n)/x^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 3.69423, size = 14, normalized size = 0.64 \[ - \frac{a}{x} - \frac{b x^{n - 1}}{- n + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((a+b*x**n)/x**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0141125, size = 19, normalized size = 0.86 \[ \frac{b x^{n-1}}{n-1}-\frac{a}{x} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b*x^n)/x^2,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.014, size = 21, normalized size = 1. \[{\frac{1}{x} \left ({\frac{b{{\rm e}^{n\ln \left ( x \right ) }}}{-1+n}}-a \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((a+b*x^n)/x^2,x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)/x^2,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.242982, size = 31, normalized size = 1.41 \[ -\frac{a n - b x^{n} - a}{{\left (n - 1\right )} x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)/x^2,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 1.56892, size = 32, normalized size = 1.45 \[ \begin{cases} - \frac{a n}{n x - x} + \frac{a}{n x - x} + \frac{b x^{n}}{n x - x} & \text{for}\: n \neq 1 \\- \frac{a}{x} + b \log{\left (x \right )} & \text{otherwise} \end{cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a+b*x**n)/x**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{b x^{n} + a}{x^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)/x^2,x, algorithm="giac")
[Out]